<html>
	<head>
		<meta charset="utf-8"></meta>
		<title>BFont</title>
		<link href="./style.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<div class="class" name="BFont">
			<h1>BFont</h1>
			<p>继承自<a href="BObject.html">BObject</a></p>
			<p id="resume"><a href="#desc">详细</a></p>
			<h2>public</h2>
			<table id="public">
				<tr><td align="right"/><td><a href="#BFont(int)">BFont</a>(int size = 16);</td></tr>
				<tr><td align="right"/><td><a href="#BFont(const BString&,int)">BFont</a>(const BString& family, int size = 16);</td></tr>
				<tr><td align="right"/><td><a href="#BFont(const BFont&)">BFont</a>(const BFont& other);</td></tr>
				<tr><td align="right"/><td><a href="#~BFont()">~BFont</a>();</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#copy(const BFont*)">copy</a>(const BFont* other);</td></tr>
				<tr><td align="right">virtual BFont* </td><td><a href="#clone() const">clone</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#empty() const">empty</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#valid() const">valid</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setFamily(const BString&)">setFamily</a>(const BString& family);</td></tr>
				<tr><td align="right">const BString&amp; </td><td><a href="#family() const">family</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setEncoding(Encoding)">setEncoding</a>(Encoding encoding);</td></tr>
				<tr><td align="right">Encoding </td><td><a href="#encoding() const">encoding</a>() const;</td></tr>
				<tr><td align="right">int </td><td><a href="#encodingCount() const">encodingCount</a>() const;</td></tr>
				<tr><td align="right">Encoding </td><td><a href="#encoding(int) const">encoding</a>(int index) const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setSize(int)">setSize</a>(int size);</td></tr>
				<tr><td align="right">int </td><td><a href="#size() const">size</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setBold(bool)">setBold</a>(bool enable);</td></tr>
				<tr><td align="right">bool </td><td><a href="#bold() const">bold</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setItalic(bool)">setItalic</a>(bool enable);</td></tr>
				<tr><td align="right">bool </td><td><a href="#italic() const">italic</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setMonospace(bool)">setMonospace</a>(bool enable);</td></tr>
				<tr><td align="right">bool </td><td><a href="#monospace() const">monospace</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setTabSize(int)">setTabSize</a>(int tabSize);</td></tr>
				<tr><td align="right">int </td><td><a href="#tabSize() const">tabSize</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setImage(const BCode&, BImage*)">setImage</a>(const BCode& code, BImage* image);</td></tr>
				<tr><td align="right">BImage* </td><td><a href="#image(const BCode&)">image</a>(const BCode& code);</td></tr>
				<tr><td align="right">const BImage* </td><td><a href="#image(const BCode&) const">image</a>(const BCode& code) const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setGlyph(const BCode&, BGlyph*)">setGlyph</a>(const BCode& code, BGlyph* glyph);</td></tr>
				<tr><td align="right">BGlyph* </td><td><a href="#glyph(const BCode&)">glyph</a>(const BCode& code);</td></tr>
				<tr><td align="right">const BGlyph* </td><td><a href="#glyph(const BCode&) const">glyph</a>(const BCode& code) const;</td></tr>
				<tr><td align="right">BSize </td><td><a href="#codeSize(const BCode&) const">codeSize</a>(const BCode& code) const;</td></tr>
				<tr><td align="right">int </td><td><a href="#codeWidth(const BCode&) const">codeWidth</a>(const BCode& code) const;</td></tr>
				<tr><td align="right">int </td><td><a href="#codeHeight(const BCode&) const">codeHeight</a>(const BCode& code) const;</td></tr>
				<tr><td align="right">BSize </td><td><a href="#textSize(const BString&) const">textSize</a>(const BString& text) const;</td></tr>
				<tr><td align="right">BSize </td><td><a href="#textSize(const BString&, int) const">textSize</a>(const BString& text, int size) const;</td></tr>
			</table>
			<div id="desc">
				<h2>详细介绍：</h2>
				<p>Font has load from file such as ".ttf", ".otf".Each font has family, size and attributes. Font only use image but bitmap format. When a font is loading, font file path order will be local path set used BFont::AppPath() first, then find in the "font" folder of application's root path, if failed then find file in the folder of BWE install path, at last find the font file in system font folder.</p>
				<p>See also : </p>
			</div>
			<h2 id="docs">成员文档：</h2>
			<div id="BFont(int)">
				<h3>BFont(int size = 16);</h3>
				<p>Constructs font with size.</p>
			</div>
			<div id="BFont(const BString&,int)">
				<h3>BFont(const BString&amp; family, int size = 16);</h3>
				<p>Constructs font with family and size.</p>
			</div>
			<div id="BFont(const BFont&)">
				<h3>BFont(const BFont&amp; other);</h3>
			</div>
			<div id="~BFont()">
				<h3>~BFont();</h3>
				<p>Destroys font.</p>
			</div>
			<div id="copy(const BFont*)">
				<h3>virtual void copy(const BFont* other);</h3>
			</div>
			<div id="clone() const">
				<h3>virtual BFont* clone() const;</h3>
			</div>
			<div id="empty() const">
				<h3>bool empty() const;</h3>
			</div>
			<div id="valid() const">
				<h3>bool valid() const;</h3>
			</div>
			<div id="setFamily(const BString&)">
				<h3>bool setFamily(const BString&amp; family);</h3>
				<p>Family can be full path eg "E;/BWE/bin/font/times.ttf" or just family name eg "times", family is invalid like "times.ttf".If you give the full path, then the same family font will be locate at only this path.</p>
			</div>
			<div id="family() const">
				<h3>const BString&amp; family() const;</h3>
				<p>Get family of this font.</p>
			</div>
			<div id="setEncoding(Encoding)">
				<h3>bool setEncoding(Encoding encoding);</h3>
				<p>A font file contains several encoding format, you can choose the special one as current.</p>
			</div>
			<div id="encoding() const">
				<h3>Encoding encoding() const;</h3>
				<p>Get the current encoding of font.</p>
			</div>
			<div id="encodingCount() const">
				<h3>int encodingCount() const;</h3>
				<p>Get the number of this family encoding list.</p>
			</div>
			<div id="encoding(int) const">
				<h3>Encoding encoding(int index) const;</h3>
				<p>Get the indexed encoding in the family encoding list.</p>
			</div>
			<div id="setSize(int)">
				<h3>bool setSize(int size);</h3>
				<p>Set font size.</p>
			</div>
			<div id="size() const">
				<h3>int size() const;</h3>
			</div>
			<div id="setBold(bool)">
				<h3>void setBold(bool enable);</h3>
				<p>If this font family has bold data, this method works.</p>
			</div>
			<div id="bold() const">
				<h3>bool bold() const;</h3>
				<p>Get font bold value.</p>
			</div>
			<div id="setItalic(bool)">
				<h3>void setItalic(bool enable);</h3>
			</div>
			<div id="italic() const">
				<h3>bool italic() const;</h3>
			</div>
			<div id="setMonospace(bool)">
				<h3>void setMonospace(bool enable);</h3>
			</div>
			<div id="monospace() const">
				<h3>bool monospace() const;</h3>
			</div>
			<div id="setTabSize(int)">
				<h3>void setTabSize(int tabSize);</h3>
				<p>Tab size is number of font size.</p>
			</div>
			<div id="tabSize() const">
				<h3>int tabSize() const;</h3>
			</div>
			<div id="setImage(const BCode&, BImage*)">
				<h3>void setImage(const BCode&amp; code, BImage* image);</h3>
			</div>
			<div id="image(const BCode&)">
				<h3>BImage* image(const BCode&amp; code);</h3>
			</div>
			<div id="image(const BCode&) const">
				<h3>const BImage* image(const BCode&amp; code) const;</h3>
			</div>
			<div id="setGlyph(const BCode&, BGlyph*)">
				<h3>void setGlyph(const BCode&amp; code, BGlyph* glyph);</h3>
			</div>
			<div id="glyph(const BCode&)">
				<h3>BGlyph* glyph(const BCode&amp; code);</h3>
			</div>
			<div id="glyph(const BCode&) const">
				<h3>const BGlyph* glyph(const BCode&amp; code) const;</h3>
			</div>
			<div id="codeSize(const BCode&) const">
				<h3>BSize codeSize(const BCode&amp; code) const;</h3>
			</div>
			<div id="codeWidth(const BCode&) const">
				<h3>int codeWidth(const BCode&amp; code) const;</h3>
			</div>
			<div id="codeHeight(const BCode&) const">
				<h3>int codeHeight(const BCode&amp; code) const;</h3>
			</div>
			<div id="textSize(const BString&) const">
				<h3>BSize textSize(const BString&amp; text) const;</h3>
				<p/><a/>
				<p>Return the text size in this font, '\n' will expand height to next line.</p>
			</div>
			<div id="textSize(const BString&, int) const">
				<h3>BSize textSize(const BString&amp; text, int size) const;</h3>
			</div>
		</div>
	</body>
</html>